package com.tools.controller;

import javafx.fxml.FXML;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import org.apache.log4j.Logger;

import java.net.URL;
import java.util.ResourceBundle;

/**
 * ConnectController
 *
 * @author < a href=" ">ZhangYang</ a>
 * @version v1.0.01
 * @date 2018-07-25 16:55
 */
public class AboutMeController extends BaseController {
  private static final Logger LOG = Logger.getLogger(AboutMeController.class);

  @FXML
  private ImageView aboutImg;
  @FXML
  private AnchorPane main;
  @FXML
  private TextFlow textFlow;


  @Override
  public void initialize(URL location, ResourceBundle resources) {
    aboutImg.setImage(new Image("image/about.png"));
    main.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> {
      closeDialogStage();
    });
    String family = "Helvetica";
    double size = 50;

    Text text1 = new Text("Hello ");
    text1.setFont(Font.font(family, size));
    text1.setFill(Color.RED);

    Text text2 = new Text("CODE");
    text2.setFill(Color.ORANGE);
    text2.setFont(Font.font(family, FontWeight.BOLD, size));

    Text text3 = new Text("TOOLS");
    text3.setFill(Color.GREEN);
    text3.setFont(Font.font(family, FontPosture.ITALIC, size));

    textFlow.getChildren().addAll(text1, text2, text3);

  }

}
